<template>
  <a-card :bordered="false">
    <a-tabs v-if="show" @change="handleChangeTabs" >
      <a-tab-pane :tab="key" :key="index" v-for="(question,key,index) in model">
        <a-list item-layout="horizontal" :data-source="question">
          <a-list-item slot="renderItem" slot-scope="item, index">
            <a-list-item-meta
              :description="item.content"
            >
              <a slot="title" href="https://www.antdv.com/">{{index+1}}.{{ item.name }}</a>
            </a-list-item-meta>
          </a-list-item>
        </a-list>


      </a-tab-pane>

    </a-tabs>
    <div v-else>暂未完成调查问卷</div>
  </a-card>

</template>
<script>
  import { getAction, postAction } from '@api/manage'
  import ACol from 'ant-design-vue/es/grid/Col'
  import MemberModal from './MemberModal'

  export default {
    name: 'MemberQuestion',
    components: { MemberModal, ACol },
    data() {
      return {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 }
        },
        model: {},
        show:true
      }

    },
    created() {

    },
    methods: {
      handleEdit(){
        this.$refs.modal.edit(this.model)
      },
      getById(id) {
        getAction('/ums/member/question/' + id).then(res => {
          if (res.success) {
            this.model = res.result
          } else {
            this.show=false
          }
        })
      }
    }
  }

</script>
<style scoped>

  .label_left {
    text-align: center;
    line-height: 50px;
    background-color: #dddddd;
    border-bottom: solid 2px #dddddd;
    border-top: solid 2px #dddddd
  }

  .label_right {
    line-height: 50px;
    padding-left: 20px;
    border-bottom: solid 2px #dddddd;
    border-top: solid 2px #dddddd;
    border-right: solid 2px #dddddd
  }

</style>